package cn.yitun.chat.yitunservercommonlib.converter.dto2po.system;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.system.MenuDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.system.MenuInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户聊天内容转换
 */
@Mapper(componentModel = "spring")
public interface MenuDto2PoConverter {

    MenuDto2PoConverter INSTANCE = Mappers.getMapper(MenuDto2PoConverter.class);

    MenuDto do2dto(MenuInfo info);

    List<MenuDto> do2dto(List<MenuInfo> doList);

    @InheritInverseConfiguration
    MenuInfo dto2do(MenuDto dto);
    @InheritInverseConfiguration
    List<MenuInfo> dto2do(List<MenuDto> dtoList);

}
